<template>
    <div class="wrapper">
        <common-header />
        <div class="content-box">
            <div class="content">
                <router-view v-slot="{ Component }">
                    <transition name="fade" mode="out-in">
                        <component :is="Component" />
                    </transition>
                </router-view>
                <el-backtop target=".content" />
            </div>
        </div>
    </div>
</template>

<script setup>
import commonHeader from "@/components/userHeader.vue";
</script>

<style scoped>
.wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.content-box {
    position: absolute;
    left: 0;
    right: 0;
    top: 70px;
    bottom: 0;
    padding-bottom: 30px;
    background: #F5F7F9;
}

.content {
    width: auto;
    height: 99%;
    margin: 10px;
    padding: 10px;
    background-color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease-in-out;
    border-radius: 10px;
    overflow: auto;
}

.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.3s ease;
}

.fade-enter,
.fade-leave-to {
    opacity: 0;
}
</style>
